class Solution:
    def moveZeroes(self, nums: list) -> None:
        count_zero, i, length = 0, 0, len(nums)
        while i < length - count_zero:
            if nums[i] == 0:
                nums.append(nums.pop(i))
                count_zero += 1
            else:
                i += 1


a = Solution()
lists = [0, 1, 0, 3, 12]
a.moveZeroes(lists)
print(lists)
